package com.oop.demo04;

public class Animal {
    private String name;
    private int age;

    public Animal(){}
    //构造方法初始化属性
    public Animal(String name,int age){
        this.name=name;
        this.age=age;

    }
    public void sayHello(){
        System.out.println("hello,父类方法");
    }
    public void run(){
        System.out.println(this.name+"是"+this.age+"岁了，正在跑======");

    }

}
